<html>
<head><meta charset="utf-8"><title>extension merging · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html">extension merging</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207852764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207852764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207852764">(Aug 24 2020 at 14:52)</a>:</h4>
<p>I figured it might be a good idea to have an umbrella topic for the merger while it's under way.</p>
<p><span class="user-mention" data-user-id="133169">@matklad</span> I'm porting the update and release id/tag portions of the original code and would like to detach installed RA version from the extension version itself (and thus having to implement auto-update for 'stable' releases). The way I set up stuff before is so the user can specify <code>releaseTag</code> that will be downloaded. I propose that we can also specify <code>stable</code> (analogously to <code>nightly</code>) which will fetch the latest non-nightly release and which will be also gated behind some internal github poll timeout (e.g. 1hr like now, for nightly). Does that sound good?</p>



<a name="207852929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207852929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207852929">(Aug 24 2020 at 14:53)</a>:</h4>
<p>So in addition to specifying e.g. <code>nightly</code> or <code>2020-08-24</code> we can also specify <code>stable</code> which should be auto-updating and try to pull the latest release from GH from time to time <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="207853013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853013">(Aug 24 2020 at 14:54)</a>:</h4>
<p>Let me think for a moment, that's probably the most tricky bit...</p>
<p>FWIW, I think to just merge the extensions, it's fine to start with an explicitely specified path, and tackle auto-update in a separate PR</p>



<a name="207853061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853061">(Aug 24 2020 at 14:54)</a>:</h4>
<p>IE, I wouldn't find it unreasonable to say "hey, rust-lang/rust extension just uses the version from <code>rustup</code>"</p>



<a name="207853143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853143">(Aug 24 2020 at 14:55)</a>:</h4>
<p>the thing is, just merging as-is would lose the auto-update feature for RA as it is now</p>



<a name="207853206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853206">(Aug 24 2020 at 14:55)</a>:</h4>
<p>because we don't continuously release vsix extensions with bumped release versions from package.json that are later used to fetch 'latest' RA</p>



<a name="207853313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853313">(Aug 24 2020 at 14:56)</a>:</h4>
<p>and I'd prefer to tackle this now rather than have a period of time where we temporarily change the current release model for the extension</p>



<a name="207853398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853398">(Aug 24 2020 at 14:57)</a>:</h4>
<p>I mean, we should fix this <em>before</em> we say to folks "hey, switch to rust-lang/rust extension", but we don't have to do this in the initial PR</p>



<a name="207853406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853406">(Aug 24 2020 at 14:57)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> oh right I forgot about RA being shipped with rustup <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span></p>



<a name="207853541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853541">(Aug 24 2020 at 14:58)</a>:</h4>
<p>let me think</p>



<a name="207853660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853660">(Aug 24 2020 at 14:59)</a>:</h4>
<p>where does it install the binary? to <code>.cargo/bin/rust-analyzer</code>?</p>



<a name="207853705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853705">(Aug 24 2020 at 14:59)</a>:</h4>
<p>it = rustup? I am not sure if the shim is already in place.</p>



<a name="207853730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207853730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207853730">(Aug 24 2020 at 15:00)</a>:</h4>
<p>But we can ask rustup folks to do a minor release, and than yeah, it will be there</p>



<a name="207854043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207854043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207854043">(Aug 24 2020 at 15:02)</a>:</h4>
<p>we can do that separately</p>



<a name="207854132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207854132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207854132">(Aug 24 2020 at 15:02)</a>:</h4>
<p>okay then, let's leave the auto updates for later</p>



<a name="207854158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207854158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207854158">(Aug 24 2020 at 15:02)</a>:</h4>
<p>Users can already set explicit releaseTag or path to the server binary</p>



<a name="207854715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207854715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207854715">(Aug 24 2020 at 15:07)</a>:</h4>
<p>So, the original motivation behind tying the two versions together was to avoid doing HTTP requests without explicit user's consent. </p>
<p>That is, we were able to leverage marketplace's auto-update function. But just looking, locally, at the version of the extension and the version of the binary, we could say if we need to auto-update. </p>
<p>As opposed to querying GH API just to figure out if we need to update. </p>
<p>We definitely want separate release schedules for server and extension, at least for the time being. So, it seems like there's no other way than to implement auto-update on stable. And of course the question of defaults araises:</p>
<ul>
<li>if the auto-update is opt-in, many folk won't enable it for the lack of knowledge.</li>
<li>we can show popup on startap, but that is <strong>horrible</strong> user-experience (really, startup popups are most annoying, they are the last resort for cases where you've failed to solve the problem)</li>
<li>we can do some aproximate auto-update: the release is fixed on mondays, so checking every tuesday should work.</li>
<li>we can maybe just enable the thing by default?</li>
</ul>



<a name="207855887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207855887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Igor Matuszewski <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207855887">(Aug 24 2020 at 15:15)</a>:</h4>
<p>These are valid points, thanks for bringing up the original motivation. While I appreciate not doing the HTTP requests without user consent, I don't think needs as much attention:</p>
<ul>
<li>from privacy standpoint such a request is essentially stateless and does not carry any private nor even aggregate telemetry</li>
<li>if we care about user's data plan then we can use the graphql api from github to only select data we're interested in (and it's behind a 1 hr time interval already)</li>
</ul>
<p>However, if we also account for <code>rustup</code> as another means of auto-updating the server binary, then we might need to rethink on how to best tackle that and let the user select the release model they want to follow.</p>
<p>Let's leave this for now, then :) We can implement a simple auto-update after this PR; this should give us more time to rethink our possible options</p>



<a name="207860735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/extension%20merging/near/207860735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/extension.20merging.html#207860735">(Aug 24 2020 at 15:55)</a>:</h4>
<p>With <code>rustup</code> there should be no auto update. rust-analyzer is bound to a specific rust toolchain version. I don't think anybody wants an editor extension to suddenly update rustc while building a project.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>